package spring;

import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
 class Config {


    @Bean
    public PinkPig test2(Pig pig){
        System.out.println(pig.getName()+"哇哇");
        return new PinkPig();
    }

}

@Data
 public class PinkPig {

    private String name="粉色小猪";


}
